package library.and.xps.com.step.m.model;

import java.util.Date;

import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
import io.realm.annotations.RealmClass;

@RealmClass
public class DaliyRecord extends RealmObject {
    private int stepCount;//当前总步数

    @PrimaryKey
    private Long timeStamp; //主键  毫秒 用来判断应该插入还是更新

    private Date date;

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public DaliyRecord() {
    }

    public DaliyRecord(int stepCount, Date date, long time) {
        this.stepCount = stepCount;
        this.timeStamp = time;
        this.date = date;
    }

    public long getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(long timeStamp) {
        this.timeStamp = timeStamp;
    }

    public int getStepCount() {
        return stepCount;
    }

    public void setStepCount(int step) {
        this.stepCount = step;
    }

    @Override
    public String toString() {
        return "DaliyRecord{" +
                "stepCount=" + stepCount +
                ", timeStamp='" + timeStamp + '\'' +
                ", date=" + date.toLocaleString() +
                '}';
    }
}
